/*
* 生成抽象套餐类
* */

package Question3;

public abstract class Package {

    private double expenses; //每月资费

    public Package(double expenses) {
        setExpenses(expenses);
    }

    public Package() {}

    public double getExpenses() {
        return expenses;
    }

    public void setExpenses(double expenses) {
        if (expenses  < 0) {
            this.expenses = expenses;
        } else {
            System.out.println("费用不合理！");
        }
    }

    public abstract void show();
}
